# -*- codeing = utf-8 -*-
# @Time : 2021/2/28 14:39
# @Atuthor: 朱朱
# @File: 158主界面搭建.py
# @Software: PyCharm
""
"""

"""
def add_user():
    print('添加用户')

def del_user():
    print('删除用户')

def modify_user():
    print('修改用户')

def search_user():
    print('查询用户')

def show_all():
    print('显示所有名片')

def exit_system():
    answer = input('亲,您确定要退出吗?(yes or no)')
    return answer.lower() == 'yes'


def start():
    while True:
        print(
            "---------------------------\n名片管理系统 V1.0\n1:添加名片\n2:删除名片\n3:修改名片\n4:查询名片\n5:显示所有名片\n6:退出系统\n---------------------------"
        )
        operator = input('请输入您要进行的操作(数字):')
        if operator == '1':
            add_user()
        elif operator == '2':
            del_user()
        elif operator == '3':
            modify_user()
        elif operator == '4':
            search_user()
        elif operator == '5':
            show_all()
        elif operator == '6':
            is_sure = exit_system()
            if is_sure:
                break
        else:
            print('您的输入不合法,请重新输入')

if __name__ == '__main__':
    start()